const KoaRouter = require('@koa/router')
const { verifyAuth } = require('../middleware/loginMiddleware.js')
const { handleAvatar } = require('../middleware/fileMiddlerware.js')
const { create } = require('../controller/fileControll.js')
const fileRouter = new KoaRouter({prefix:'/file'})

// 上传头像
fileRouter.post('/avatar' , verifyAuth  ,  handleAvatar ,  create)


module.exports = fileRouter